<?php defined('SYSPATH') or die('No direct script access.') ;

class Model_Card_Sale extends Model
{

    public function all_sql()
    {
        return DB::select('sale.*', 'card.card_no', 'card.card_pwd')
            ->from(array('card_sales', 'sale'))
            ->join(array('cards', 'card'), 'LEFT')
            ->on('sale.card_id', '=', 'card.card_id');
    }

}